Strong number program in python